package com.vcredit.creditcat.service.product;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.vcredit.creditcat.model.CustProduct;
import com.vcredit.creditcat.persistence.CustProductMapper;
/**
 * 
 **/
@Service
public class CustLoanProductService {
	@Autowired
    private CustProductMapper mapper;
    
    public void insert(CustProduct obj){
    	mapper.insert(obj);
    }
    
    public void update(CustProduct obj){
    	mapper.update(obj);
    }
    
    public List<CustProduct> findAll(){
		return mapper.findAll();
	}
	
	@SuppressWarnings("unused")
	private List<CustProduct> find(CustProduct obj){
		return mapper.find(obj);
	}

	public int getSuccessLoanCount(Long custId) {
		return mapper.getSuccessLoanCount(custId);
	}
}